<template>
	<view class="bg-white" style="background: #90AEE0;min-height: 100vh;"
		:style="{background:'url('+Imgbase+'/'+skin+'_goodpoor_bgc.png)','background-size':'100%',}">

		<view class="padding-top-50 padding-left-40 flex-between">
			<view class="flex-between">
				<image class="w-80 h-80" :src="Imgbase+'/'+skin+'_goodpoor_img1.png'" mode="aspectFit" @click="back">
				</image>

				<view class="padding-left-20 padding-top-25">
					<image :class="skin == 'classics'?'w-100 h-100':'w-110 h-130'" @click="gobape"
						:src="Imgbase+'/'+skin+'_goodpoor_img2.png'" mode="aspectFit">
					</image>
				</view>
			</view>

			<view class=" padding-right-35 padding-top-95 df alc padding-top-15">
				<button class="w-140 h-105"
					style="display: flex;justify-content: right;overflow: hidden;background-color:transparent;"
					open-type="share">
					<image class="w100 h100" mode="aspectFit" :src="Imgbase + '/new_goodinfdex_img4.png'">
					</image>
				</button>
				<image class="w-100 h-80" :src="Imgbase + '/new_goodinfdex_img2.png'" mode="aspectFit"
					@click="showExplain(5)">
				</image>
			</view>
		</view>

		<view class="w-680 radius-20 top_item h-585" :class="skin == 'classics'?'skinco':''">

			<view class="w100 h100 margin-auto"
				:style="{background:'url('+Imgbase+'/'+skin+'_goodpoor_img3.png)','background-size':'100% 100%',}">
				<view class="w100 text-center" style="position: relative;">
					<view class="w-570 h-440 margin-auto" style="position: relative;">
						<image class="w-570 h-440 radius-20 imgto" :src="desc.adimage" mode="aspectFill"
							@click="viewAdimage()">
						</image>

						<view class="buylock font-24 flex" @click="locktan()" v-if="desc.openlock == 1">
							<view class="padding-right-5">
								锁定规则
							</view>
							<u-icon name="error-circle" color="#fff"></u-icon>
							<!--  -->
						</view>

						<view class="userlock font-24" v-if="poorlock.state == 2">
							{{poorlock.nickname}}已锁定套盒，剩余{{poorlock.un_look_time}}秒
						</view>
					</view>

					<view class="" style="position: absolute;right: 0;bottom: 0;"
						v-if="desc.chuan_template_desc_id > 0 && desc.chuan_num > 0">
						<image @click="lookofmes()" class="w-150 h-100" :src="Imgbase + '/1zhan_chuanchuan.png'"
							mode="aspectFit">
						</image>
					</view>

					<view class="" style="position: absolute;right: 0;bottom: 0;">
						<!-- v-if="desc.havebox == 1 || desc.havebox2 == 1" -->
						<image class="w-130 h-90" v-if="desc.havebox == 1 || desc.havebox2 == 1"
							:src="Imgbase + '/kp_in_boxrule.png'" @click="lookboxmes()" mode="aspectFit">
						</image>
						<image class="w-150 h-120" v-if="desc.oos_template_desc_id > 1 || desc.ffs_template_desc_id > 1"
							:src="Imgbase + '/1zhans_com_ofs.png'" @click="lookofmes()" mode="aspectFit">
						</image>
					</view>

					<view class="text-ff Afont" style="" v-if="desc.double_f == 1">
						个人连续购买15发不被中断，锁箱60秒
					</view>



					<view class="" style="position: absolute;left: 32rpx;top: 250rpx;">
						<scroll-view scroll-y class="" scroll-with-animation
							style="height: 200rpx;overflow: hidden;background-color: rgba(0, 0, 0, .3);">
							<view class=" h100 fff font-17">
								<view class=" w100 padding-10" v-for="(item,index) in desc.reword_text" :key="index">
									<view class='text_item'
										v-if="item.reword_type_name == 'First'||item.reword_type_name == 'Last'||item.reword_type_name == '全局'||item.reword_type_name == '冲冲'">
										{{item.reword_type_name}}:{{item.nownumber}}/{{item.allnumber}}
									</view>
									<view class='text_item'
										v-if="item.reword_type_name != 'First'&&item.reword_type_name != 'Last'&&item.reword_type_name != '全局'&&item.reword_type_name != '冲冲'&&item.nownumber!=0">
										{{item.reword_type_name}}:{{Number(item.allnumber/desc.number*100).toFixed(2)}}%
									</view>
									<view class='text_item'
										v-if="item.reword_type_name != 'First'&&item.reword_type_name != 'Last'&&item.reword_type_name != '全局'&&item.reword_type_name != '冲冲'&&item.nownumber==0">
										{{item.reword_type_name}}:0.00%
									</view>
								</view>
							</view>
						</scroll-view>
					</view>
				</view>



				<!-- 新年皮肤 春季皮肤 -->
				<view class="flex-between padding-left-45 padding-right-45 padding-top-15 "
					v-if="skin == 'newyear' || skin == 'qing'">
					<view class="font-42 Afont one-line"
						style="color:#F9FADA;width: 75%;-webkit-text-stroke: 2rpx #F58705;">
						{{desc.name}}
					</view>

					<view class="Bfont font-42" style="color: #E60000;-webkit-text-stroke: 2rpx #fff;">
						￥{{desc.cost}}
					</view>
				</view>

				<!-- 经典皮肤 冬季皮肤 -->
				<view class="flex-between padding-left-45 padding-right-45 padding-top-15" v-else>
					<view class="font-39 Afont one-line" style="width: 75%;"
						:class="skin == 'classics'?'text_color3':'text_color2winter'">
						{{desc.name}}
					</view>

					<view class="Bfont font-42" style="color: #E60000;">
						￥{{desc.cost}}
					</view>
				</view>

				<view class="Afont padding-left-45 padding-top-15" style="color: #427348;" v-if="skin == 'qing'">
					总数: {{desc.number}}
				</view>

				<view class="Afont padding-left-45 padding-top-15" v-else
					:class="skin == 'winter'?'text_color2winter':'text_color3'">
					总数: {{desc.number}}
				</view>
			</view>
		</view>

		<view class="bottom_item">

			<!-- 经典皮肤 -->
			<view class="bgcimg h-400" v-if="skin == 'classics'">
				<image class="w100 h100" :src="Imgbase + '/new_goodinfdex_img8.png'" mode="widthFix">
				</image>
			</view>

			<view class="" v-if="skin == 'winter'">
				<view class="bgcimgwinter">
					<image class="w100 h-400" :src="Imgbase + '/winter_goodpoor_img4.png'" mode="aspectFit">
					</image>
				</view>

				<view class="bgcimg1">
					<image class="w100 h-200" :src="Imgbase + '/winter_goodpoor_img9.png'" mode="aspectFit">
					</image>
				</view>
			</view>


			<view class="bgc_bot padding-top-40" :class="skin == 'classics'?'skinbgc':''">
				<view class="w100 h100"
					:style="{background:'url('+Imgbase+'/'+skin+'_goodpoor_img5.png)','background-size':'100%',}">
					<!-- tab切换 -->
					<view class="w100 flex-center padding-top-80 padding-left-60 padding-right-60"
						style="position: relative;z-index: 99;">
						<view class="">
							<image @click="tab_btn(1)" class="w-165 h-70"
								:src=" Imgbase+'/'+skin+'_goodpoor_img13' + [tab==1?'_c':''] + '.png'" mode="aspectFit">
							</image>
						</view>

						<view class="padding-left-35" v-if="desc.count == 0">
							<image @click="tab_btn(2)" class="w-165 h-70"
								:src=" Imgbase+'/'+skin+'_goodpoor_img14' + [tab==2?'_c':''] + '.png'" mode="aspectFit">
							</image>
						</view>

						<view class="padding-left-35" v-else>
							<image @click="tab_btn(3)" class="w-165 h-70"
								:src=" Imgbase+'/'+skin+'_goodpoor_img15' + [tab==3?'_c':''] + '.png'" mode="aspectFit">
							</image>
						</view>
					</view>

					<view class="padding-left-120 padding-right-120 padding-top-8">
						<!-- {{explain1}} -->

						<image class="w100 h-80" :src="Imgbase+'/'+skin+'_goodpoor_img7.png'" mode="aspectFit">
						</image>
					</view>

					<!-- 概率 -->
					<view class="padding-top-30 record Afont padding-left-20 padding-right-20 padding-bottom-30"
						v-if="tab == 3" :class="skin == 'winter'?'skinwin':'skinca'">

						<view class="padding-15 nightitem margin-bottom-20 flex-between radius-20 font-24"
							v-for="(item,index) in  desc.info_text" :key="index">
							<view class="w-100 h-100">
								<image :src="item.goodmes.adimage" mode="aspectFit" class="w100 h100 radius-15"></image>
							</view>

							<view class="text_color2winter padding-left-10 font-26 w-100 text-center">
								{{item.reword_type_name}}赏
							</view>

							<view class="text_color2winter padding-left-10 w-100 text-center">
								总量{{item.allnumber}}
							</view>

							<view class="text_color2winter padding-left-10 w-220 one-line">
								{{item.goodmes.name}}
							</view>

							<view class="text_color2winter padding-left-10">
								{{(item.allnumber/desc.number*100).toFixed(2)}}%
							</view>
						</view>

					</view>

					<!-- 奖品列表 -->
					<view class="padding-20" style="overflow: hidden;position: relative;z-index: 99;" v-if="tab == 1">
						<view class="cu-item fl text-sm padding-8 radius-10 list_item  fff" style="width: 30%;margin-bottom: 10upx;
						margin-top: 0rpx;position: relative;height: 370rpx;" v-for="(item,index) in desc.info_text"
							:style="{background:'url('+Imgbase+'/'+skin+'_goodpoord_img3n.png)','background-size':'100% 100%',}">
							<view class="image"
								@click="lookImages(item.goodmes.adimage,item.goodmes.name,item.goodmes.back_price)">
								<!-- 	<view class="bg-black"
									style="position: absolute;width: 97%;height: 200rpx;z-index: 20;display: flex;justify-content: center;align-items: center;"
									v-if="item.nownumber == 0">
									<image :src="Imgbase + '/1zhan_selled.png'" mode="aspectFit"
										style="width: 170upx;height: 170upx;">
									</image>
								</view> -->
								<image :src="item.goodmes.adimage" mode="aspectFit" style="height: 200rpx;"></image>
								<view class="cu-bar " style="
								display: block;line-height: 40upx;opacity: 0.9;height: 170upx;padding: 8upx;">
									<image v-if="item.reword_type_name == 'First'" class="fl"
										:src="Imgbase + '/first2.png'"
										style="width: 120upx;height: 40upx;z-index: 80;position: relative;margin-left: 0upx;margin-top: 5upx;">
									</image>
									<image v-if="item.reword_type_name == 'Last'" class="fl"
										:src="Imgbase + '/last2.png'"
										style="width: 110upx;height: 40upx;z-index: 80;position: relative;margin-left: 0upx;margin-top: 5upx;">
									</image>
									<image v-if="item.reword_type_name == '全局'" class="fl"
										:src="Imgbase+'/'+skin+'_goodpoor_img8.png'" mode="aspectFit"
										style="width: 96upx;height: 50upx;z-index: 80;position: relative;margin-left: 0upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == '冲冲'" class="fl"
										:src="Imgbase + '/chognchong5.png'"
										style="width: 96upx;height: 50upx;z-index: 80;position: relative;margin-left: 0upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'A'" class="fl" :src="Imgbase + '/a2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'B'" class="fl" :src="Imgbase + '/b2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'C'" class="fl" :src="Imgbase + '/c2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'D'" class="fl" :src="Imgbase + '/d2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'E'" class="fl" :src="Imgbase + '/e2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'F'" class="fl" :src="Imgbase + '/f2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'G'" class="fl" :src="Imgbase + '/g2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'H'" class="fl" :src="Imgbase + '/h2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'I'" class="fl" :src="Imgbase + '/i2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'J'" class="fl" :src="Imgbase + '/j2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'K'" class="fl" :src="Imgbase + '/k2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'L'" class="fl" :src="Imgbase + '/l2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'M'" class="fl" :src="Imgbase + '/m2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'N'" class="fl" :src="Imgbase + '/n2.png'"
										style="width: 56upx;height: 40upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'SP'" class="fl" src="/static/fonticon/sp.png"
										style="width: 60upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'O'" class="fl" src="/static/fonticon/o.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'P'" class="fl" src="/static/fonticon/p.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'Q'" class="fl" src="/static/fonticon/q.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'R'" class="fl" src="/static/fonticon/r.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'S'" class="fl" src="/static/fonticon/s.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'T'" class="fl" src="/static/fonticon/t.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'U'" class="fl" src="/static/fonticon/u.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'V'" class="fl" src="/static/fonticon/v.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'W'" class="fl" src="/static/fonticon/w.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'X'" class="fl" src="/static/fonticon/x.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'Y'" class="fl" src="/static/fonticon/y.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_name == 'Z'" class="fl" src="/static/fonticon/z.png"
										style="width: 32upx;height: 35upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<view style="clear: both;"></view>
									<view class="w100 one-line fff Afont" :class="skin == 'qing'?'qingcolor':'orcolor'">
										{{item.goodmes.name}}
									</view>
									<view style="clear: both;"></view>
									<view class="">
										<view class="font-20">
											<text class="" :class="skin == 'qing'?'qingcolor':'orcolor'">
												<text v-if="desc.type == '1'">盲盒价:￥</text><text
													v-if="desc.type == '2'">兑换积分:</text><text class="font-24"
													v-if="desc.cost > 999">{{desc.cost}}
												</text>
												<text class="font-25" v-else>{{desc.cost}}
												</text></text>
											<!-- <text class="" style="width: 100%;"
												v-if="item.reword_type_name == 'First'||item.reword_type_name == 'Last'||item.reword_type_name == '冲冲'">
												中奖概率:0%
											</text> -->
											<!-- <text class="" style="width: 100%;"
												v-if="item.reword_type_name == ''">
												中奖概率:0%
											</text> -->
										</view>
									</view>

								</view>
							</view>
						</view>
					</view>

					<!-- 记录 -->
					<view class="padding-top-30 record Afont" v-if="tab == 2"
						:class="skin == 'winter'?'skinwin':'skinca'">
						<!-- 全局赏 -->
						<view class="solid-bottom light" v-for="(item,index) in rewordlist" :key="index"
							style="width: 94%;margin-left: 3%;">
							<view class="action fl text-sm    "
								:class="skin == 'classics'?'text_color2':'text_color2winter'"
								style="text-align: center;width: 110rpx;padding-left: 12rpx;">
								<view class="action text-lg text-center text-bold" style="padding-top: 30rpx;"
									v-if="item.reword_type_id != 33&&item.reword_type_id != 34&&item.reword_type_id !== 43&&item.reword_type_id !== 42">
									{{item.index}}
								</view>
								<view class="action text-lg  text-center text-bold" style="padding-top: 30rpx;"
									v-if="item.reword_type_id == 33">
									冲冲
								</view>
								<view class="action text-lg  text-center text-bold" style="padding-top: 30rpx;"
									v-if="item.reword_type_id == 34">
									BOX
								</view>
								<view class="action text-lg  text-center text-bold"
									style="padding-top: 20rpx;padding-bottom: 10rpx;" v-if="item.reword_type_id == 43">
									非非
								</view>
								<view class="action text-lg  text-center text-bold"
									style="padding-top: 20rpx;padding-bottom: 10rpx;" v-if="item.reword_type_id == 42">
									欧欧
								</view>
								<text>{{item.gettime_text}}</text>
							</view>
							<view class="text-sm padding-sm  fl" style="padding-top: 30rpx;">
								<view class="content  text-df"
									style="max-width: 260upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
									<text class=" text-bold"
										:class="skin == 'classics'?'text_color2':'text_color2winter'"
										style="max-width: 260upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{item.usermes.nickname}}</text>
								</view>
								<view class="action text-df  text-bold"
									:class="skin == 'classics'?'text_color2':'text_color2winter'"
									style="max-width: 300upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
									{{item.goodmes.name}}
								</view>
							</view>
							<view class="text-sm padding  fr" style="padding-left: 0rpx;">
								<view class="content fl  text-df"
									:class="skin == 'classics'?'text_color2':'text_color2winter'">
									<!--<image v-if="item.reword_type_id == 1" class="fl" src="/static/fonticon/first.png"
								 style="width: 140upx;height: 70upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;"></image>
								<image v-if="item.reword_type_id == 2" class="fl" src="/static/fonticon/last.png"
								 style="width: 140upx;height: 70upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;"></image>-->
									<!--<image v-if="item.reword_type_id == 3" class="fl" src="/static/fonticon/quanju.png"
								  style="width: 80upx;height: 30upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 10upx;"></image>
								  :src="Imgbase + '/app_index_c_top2.png'"-->
									<image v-if="item.reword_type_id == 1" class="fl" :src="Imgbase + '/first2.png'"
										mode="aspectFit"
										style="width: 120upx;height: 68upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 2" class="fl" :src="Imgbase + '/last2.png'"
										mode="aspectFit"
										style="width: 122upx;height: 64upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 3" class="fl"
										:src="Imgbase+'/'+skin+'_goodpoor_img8.png'" mode="aspectFit"
										style="width: 130upx;height: 70upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 46" class="fl"
										:src="Imgbase + '/new_goodpoord_img7.png'" mode="aspectFit"
										style="width: 130upx;height: 70upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 33" class="fl"
										:src="Imgbase + '/chognchong5.png'"
										style="width: 140upx;height: 70upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 34" class="fl" :src="Imgbase + '/box6.png'"
										style="width: 140upx;height: 70upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 43" class="fl" :src="Imgbase + '/1zhan_sff.png'"
										style="width: 120upx;height: 50upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 42" class="fl" :src="Imgbase + '/1zhan_soo.png'"
										style="width: 120upx;height: 50upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<!--<view class="fl margin-top-sm" v-if="item.reword_type_id == 3">赏</view>-->
									<!--<view class="fl margin-top" v-if="item.reword_type_id != 3">赏</view>-->
								</view>
							</view>
							<view style="clear: both;"></view>
						</view>

						<!-- 祈愿赏 -->
						<view class="solid-bottom light " :class="skin == 'classics'?'text_color1':'text_color1winter'"
							v-for="(item,index) in praylist" :key="index" style="width: 94%;margin-left: 3%;">
							<view class="action fl text-sm padding">
								<view class="action text-lg  text-center text-bold"
									:class="skin == 'classics'?'text_color2':'text_color2winter'">
									{{item.index}}
								</view>
								{{item.gettime_text}}
							</view>
							<view class="text-sm padding-sm  fl" style="padding-top: 30rpx;">
								<view class="content  text-df"
									style="max-width: 260upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
									<text class=" text-bold"
										:class="skin == 'classics'?'text_color2':'text_color2winter'"
										style="max-width: 260upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{item.usermes.nickname}}</text>
								</view>
								<view class="action text-df  text-bold"
									:class="skin == 'classics'?'text_color2':'text_color2winter'"
									style="max-width: 350upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
									{{item.goodmes.name}}
								</view>
							</view>
							<view class="text-sm padding  fr" style="padding-left: 0rpx;">
								<view class="content fl  text-df"
									:class="skin == 'classics'?'text_color2':'text_color2winter'">
									<image class="fl" :src="Imgbase + '/1new_lucki_shang.png'" mode="widthFix"
										style="width: 140upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
								</view>
							</view>
							<view style="clear: both;"></view>
						</view>


						<view class="solid-bottom light" :class="skin == 'classics'?'text_color1':'text_color1winter'"
							v-for="(item,index) in jilulogs" :key="index" style="width: 94%;margin-left: 3%;">
							<view class="action fl text-sm padding ">
								<view class="action text-lg  text-center">
									{{item.index}}
								</view>
								{{item.paytime_text}}
							</view>
							<view class="text-sm padding-sm  fl" style="padding-top: 30rpx;">
								<view class="content  text-df"
									style="max-width: 300upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
									<text class="">{{item.usermes.nickname}}</text>
								</view>
								<view class="action text-df "
									style="max-width: 320upx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
									{{item.goodmes.name}}
								</view>
							</view>
							<view class="text-sm padding  fr" style="padding-left: 0;">
								<view class="content fl text-gray text-df">
									<image v-if="item.reword_type_id == 4" class="fl"
										:src="Imgbase+'/'+skin+'_goodpoor_img10.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 5" class="fl" :src="Imgbase + '/b3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 6" class="fl" :src="Imgbase + '/c3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 7" class="fl" :src="Imgbase + '/d3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 8" class="fl" :src="Imgbase + '/e3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 9" class="fl" :src="Imgbase + '/f3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 10" class="fl" :src="Imgbase + '/g3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 11" class="fl" :src="Imgbase + '/h3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 12" class="fl" :src="Imgbase + '/i3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 13" class="fl" :src="Imgbase + '/j3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 14" class="fl" :src="Imgbase + '/k3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 15" class="fl" :src="Imgbase + '/l3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 16" class="fl" :src="Imgbase + '/m3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 17" class="fl" :src="Imgbase + '/n3.png'"
										style="width: 92upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 30" class="fl" src="/static/fonticon/sp.png"
										style="width: 110upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 18" class="fl" src="/static/fonticon/o.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 19" class="fl" src="/static/fonticon/p.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 20" class="fl" src="/static/fonticon/q.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 21" class="fl" src="/static/fonticon/r.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 22" class="fl" src="/static/fonticon/s.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 23" class="fl" src="/static/fonticon/t.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 24" class="fl" src="/static/fonticon/u.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 25" class="fl" src="/static/fonticon/v.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 26" class="fl" src="/static/fonticon/w.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 27" class="fl" src="/static/fonticon/x.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 28" class="fl" src="/static/fonticon/y.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
									<image v-if="item.reword_type_id == 29" class="fl" src="/static/fonticon/z.png"
										style="width: 55upx;height: 65upx;z-index: 80;position: relative;margin-left: 4upx;margin-top: 0upx;">
									</image>
								</view>
							</view>
							<view style="clear: both;"></view>
						</view>

						<view class="padding" style="width: 100%;height: 80upx;">
							<view class="action fl">
								<image class="w-120 h-40" :src="Imgbase+'/'+skin+'_goodpoor_img11.png'"
									@click="jilupageleft()" mode="aspectFit"></image>
							</view>
							<view class="action fr">
								<image class="w-120 h-40" :src="Imgbase+'/'+skin+'_goodpoor_img12.png'"
									@click="jilupageright()" mode="aspectFit"></image>
							</view>
						</view>

						<view class="h-50">

						</view>
					</view>



					<view class="h-250">

					</view>
				</view>

			</view>


		</view>


		<!-- 购买按钮  春季皮肤 -->
		<view class="padding-20 flex-between btns w100" v-if="skin == 'qing'">
			<!-- 购买 -->
			<view class="cu-capsule margin-bottom-sm round " v-if="desc.othertype ==3" @click="buybutton(2)">
				<image :src="Imgbase + '/qing_goodpoor_buy10.png'" v-show="desc.count >=10&&desc.othertype ==3"
					style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
				<image :src="Imgbase + '/qing_goodpoor_buy10un.png'" v-show="desc.count <10&&desc.othertype ==3"
					style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
			</view>

			<view class="" v-else style="width: 100%;">
				<!-- 正常购买 -->
				<view class="flex-between padding-left-15 padding-right-15" v-if="desc.othertype =='0'" style="">
					<view class="cu-capsule margin-bottom-sm round" style="" @click="buybutton(2)"
						v-if="desc.othertype ==0">
						<image :src="Imgbase + '/qing_goodpoor_buy10.png'" v-show="desc.count >=10&&desc.othertype ==0"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '/qing_goodpoor_buy10un.png'" v-show="desc.count <10&&desc.othertype ==0"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '/qing_goodpoor_buy10un.png'" v-show="desc.othertype !=0"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
					</view>
					<view class="cu-capsule margin-bottom-sm round" style="" @click="buybutton(1)"
						v-if="desc.othertype ==0">
						<image :src="Imgbase + '/qing_goodpoor_buy3.png'" v-show="desc.count >=3&&desc.othertype ==0"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '/qing_goodpoor_buy3un.png'" v-show="desc.count <3&&desc.othertype ==0"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '/qing_goodpoor_buy3un.png'" v-show="desc.othertype !=0"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
					</view>
					<view class="cu-capsule margin-bottom-sm round " style="" @click="buybutton(0)">
						<image :src="Imgbase + '/qing_goodpoor_buy1.png'" v-show="desc.count >=1"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '/qing_goodpoor_buy1un.png'" v-show="desc.count <1"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
					</view>
				</view>

				<!-- 单抽 -->
				<view class="" v-if="desc.othertype !=='0'">
					<view class=" " style="width: 250rpx;margin: 0 auto;" @click="buybutton(0)">
						<image :src="Imgbase + '/qing_goodpoor_buy1.png'" v-show="desc.count >=1"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '/qing_goodpoor_buy1un.png'" v-show="desc.count <1"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
					</view>
				</view>
			</view>
		</view>

		<!-- 购买按钮 -->
		<view class="padding-20 flex-between btns w100 " v-else>
			<!-- 购买 -->
			<view class="cu-capsule margin-bottom-sm round " v-if="desc.othertype ==3" @click="buybutton(2)">
				<image :src="Imgbase + '/new_goodinfdex_buy10on.png'" v-show="desc.count >=10&&desc.othertype ==3"
					style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
				<image :src="Imgbase + '//new_goodinfdex_buy10un.png'" v-show="desc.count <10&&desc.othertype ==3"
					style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
			</view>

			<view class="" v-else style="width: 100%;">
				<!-- 正常购买 -->
				<view class="flex-between padding-left-15 padding-right-15" v-if="desc.othertype =='0'" style="">
					<view class="cu-capsule margin-bottom-sm round" style="" @click="buybutton(2)"
						v-if="desc.othertype ==0">
						<image :src="Imgbase + '/new_goodinfdex_buy10on.png'"
							v-show="desc.count >=10&&desc.othertype ==0" style="width: 220upx;height: 130upx;"
							mode="aspectFit"></image>
						<image :src="Imgbase + '//new_goodinfdex_buy10un.png'"
							v-show="desc.count <10&&desc.othertype ==0" style="width: 220upx;height: 130upx;"
							mode="aspectFit"></image>
						<image :src="Imgbase + '//new_goodinfdex_buy10un.png'" v-show="desc.othertype !=0"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
					</view>
					<view class="cu-capsule margin-bottom-sm round padding-bottom-10" style="" @click="buybutton(1)"
						v-if="desc.othertype ==0">
						<image :src="Imgbase + '//new_goodinfdex_buy3on.png'"
							v-show="desc.count >=3&&desc.othertype ==0" style="width: 220upx;height: 150upx;"
							mode="aspectFit"></image>
						<image :src="Imgbase + '//new_goodinfdex_buy3un.png'" v-show="desc.count <3&&desc.othertype ==0"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '//new_goodinfdex_buy3un.png'" v-show="desc.othertype !=0"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
					</view>
					<view class="cu-capsule margin-bottom-sm round " style="" @click="buybutton(0)">
						<image :src="Imgbase + '//new_goodinfdex_buy1on.png'" v-show="desc.count >=1"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '//new_goodinfdex_buy1un.png'" v-show="desc.count <1"
							style="width: 220upx;height: 130upx;" mode="aspectFit"></image>
					</view>
				</view>

				<!-- 单抽 -->
				<view class="" v-if="desc.othertype !=='0'">
					<view class=" " style="width: 250rpx;margin: 0 auto;" @click="buybutton(0)">
						<image :src="Imgbase + '//new_goodinfdex_buy1on.png'" v-show="desc.count >=1"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
						<image :src="Imgbase + '//new_goodinfdex_buy1un.png'" v-show="desc.count <1"
							style="width: 220upx;height: 150upx;" mode="aspectFit"></image>
					</view>
				</view>
			</view>
		</view>

		<view class="cu-modal" :class="modalName=='photomodel'?'show':''" @tap="hideModal">
			<view class="cu-dialog" style="width: 90%;height: 800rpx;background-color: #fff;" @tap.stop="">
				<view class="" style="width: 100%;position: relative;">
					<image :src="photoimg" mode="widthFix" style="width: 100%;height: 100%;"></image>
					<view class="" @click="modalName = null"
						style="position: absolute;width: 50rpx;height: 50rpx;top: 20rpx;right: 25rpx;z-index: 999;">
						<image :src="Imgbase + '/new1_infinite_close.png'" mode="widthFix"
							style="width: 100%;height: 100%;"></image>
					</view>
				</view>

				<view class="" style="margin-top: 40rpx;text-align: center;font-weight: bold;">
					{{looktitle}}
				</view>
				<!-- <view class="" style="margin-top: 10rpx;text-align: center;font-weight: bold;" v-if="lookprice > 0">
							市场价:￥{{lookprice}}
						</view> -->
			</view>
		</view>

		<!-- 恭喜获得 -->
		<view class="cu-modal" :class="modalName2=='buyModal'?'show':''" @tap="hideModal2" @tap.stop="">
			<view class="cu-dialog" style="background-color:initial;margin-top: 100rpx;width: 90%;height: 80%;">

				<view class="w100 h-800 pos_bgc">
					<image class="w100 h100" :src="Imgbase + '/new_goodfanx_img11.png'" mode="aspectFit">
					</image>
				</view>
				<view class="w100 h-800 pos_bgc2">
					<image class="w100 h100" :src="Imgbase + '/new_goodfanx_img12.png'" mode="aspectFit">
					</image>
				</view>

				<view class="" style="width: 100%;height: 100%;">

					<scroll-view class="scroll text-left" scroll-y="true" style="padding: 300rpx 50rpx 0;height: 80%;">
						<view class="box_tanchuang"
							style="width: 180rpx; height: 180rpx;float: left ;margin-bottom: 20rpx;border-radius: 8rpx;position: relative;border: 4rpx solid #F48A50;"
							v-for="(item,index) in buylist" :key="index">
							<image style="width: 100%; height: 100%;" :src="item.adimage" mode="aspectFit">
							</image>
							<view class="fonts"
								style="position: absolute; bottom: 15rpx;right: 15rpx;color: #F78852;font-weight: bold;font-size: 30rpx;">
								x{{item.num}}
							</view>
						</view>
					</scroll-view>
					<view class="" style="text-align: center;">
						<image @click="showbuy_off" class="w-300 h-80" :src="Imgbase + '/new_goodfanx_img8.png'"
							mode="aspectFit">
						</image>
					</view>
				</view>
			</view>
		</view>

		<view class="cu-modal" :class="modalName=='getPhoneNumber'?'show':''">
			<view class="cu-dialog">
				<view class="cu-bar bg-white justify-end">
					<view class="content">认证手机号</view>
					<view class="action" @tap="hideModal">
						<text class="cuIcon-close text-red"></text>
					</view>
				</view>
				<view class="padding-xl bg-white">
					您还未认证手机号，为了程序功能的正常使用请您进行微信手机认证，否则将无法通过APP手机登录到该账号。
				</view>
				<view class="cu-bar bg-white justify-end">
					<view class="action">
						<button class="cu-btn line-blue text-blue" @tap="hideModal">取消</button>
						<button class="cu-btn bg-blue margin-left" open-type="getPhoneNumber"
							@getphonenumber="onGetPhoneNumber">确定</button>
					</view>
				</view>
			</view>
		</view>


		<view class="cu-modal bottom-modal" :class="modalName=='bottomModal'?'show':''">
			<view style="width: 100%;height: 1200upx;position: absolute;top: 0%;" @tap="hideModal"></view>
			<view class="cu-dialog padding-top-200 Afont" style="color: #8E4E0D;"
				:style="{background:'url('+Imgbase+'/new_goodinfdex_pay1.png)','background-size':'100% 100%',}">
				<view class="padding-left-30">
					<view class="fl w-175 h-175 ">
						<image class="w100 h100 radius-24" :src="desc.adimage" mode="aspectFit"></image>
					</view>
					<view class="fl text-left " style="padding-left: 30rpx;">
						<view class="text-lg padding-top-10 Bfont" style="color: #E60000;">
							￥<text class="font-45 padding-left-10">{{buymoney}}</text>
						</view>
						<view class="text-sm  padding-top-3" style="color: #8E4E0D;">
							单价({{desc.cost}}/次)
						</view>
						<view class="text-sm  padding-top-5">
							购买次数{{buycount}}次
						</view>
					</view>
				</view>
				<view style="clear: both;"></view>
				<view class="padding-sm "
					:style="{background:'url('+Imgbase+'/new_goodinfdex_pay4.png)','background-size':'100% 100%',}"
					style="margin-left: 3%;width: 94%;border-radius: 20upx;margin-bottom: 20rpx;margin-top: 50rpx;">

					<view class="flex-between" v-if="coupon > 0 && desc.type != '2'">
						<view class="">剩余{{Math.floor(coupon * 1000) / 100}}GOOD豆
							(可抵值{{ Math.floor(coupon * 100) / 100}})</view>
						<view class=" w-40 h-40 radius-20 margin-right-8 flex-center"
							style="border: 4rpx solid #8E4E0D;background-color: #fff;" @click="radioChange">
							<view class="w-24 h-24 radius-12" style="background-color: #5F9764;" v-if="checked">

							</view>
						</view>
					</view>

					<!-- <view class="flex-between padding-top-10" v-if="score > 0 && desc.type != '2'">
								<view class="">剩余{{score}}积分
									(可抵值{{score/10>buymoney/2?buymoney/2:score/10}})</view>
								<view class=" w-40 h-40 radius-20 margin-right-8 flex-center"
									style="border: 4rpx solid #8E4E0D;background-color: #fff;" @click="scoreChange">
									<view class="w-24 h-24 radius-12" style="background-color: #5F9764;"
										v-if="scorechecked">

									</view>
								</view>
							</view> -->
				</view>


				<view style="clear: both;"></view>
				<view class="padding-sm" style="margin-left: 3%;width: 94%;border-radius: 20upx;"
					:style="{background:'url('+Imgbase+'/new_goodinfdex_pay3.png)','background-size':'100% 100%',}">
					<view class="flex-between">
						<view class="">需支付</view>
						<view class=" text-lg" style="color: #e66142;">￥{{buymoneys}}</view>
					</view>
					<view class="flex-between padding-top-15">
						<view class="">剩余余额</view>
						<view class=" text-lg" style="color: #e66142;">￥{{money}}</view>
					</view>
				</view>
				<view class="cu-bar padding-top-20">
					<view class="action flex-sub text-green " style="min-height: 100rpx;" @tap="submitLuck()">
						<image class="w-280 h-90" :src="Imgbase + '/new_goodinfdex_pay2.png'" mode="aspectFit">
						</image>
					</view>
				</view>
				<view style="clear: both;"></view>
				<view style="width: 100%;height: 40upx;"></view>
			</view>
		</view>

		<view class="cu-modal" :class="modalName=='Modal'?'show':''" @tap="hideModal">
			<view class="cu-dialog" style="background-color:initial;">
				<view class="bg-img"
					:style="{background:'url('+Imgbase+'/gooddetail_alarm_bg4.png) no-repeat','background-size':'100% 100%','height':'1200rpx'}">
					<view style="width: 100%;height: 90upx;"></view>
					<view class="padding-left-100 padding-right-100">
						<view class="radius-12 padding-10"
							style="border: 2rpx solid #000;text-align: left;color: #000;">
							本场次包含{{numa}}个A赏商品，单个商品购买获取概率{{(numa/desc.number*100).toFixed(2)}}%
							<view class="">
								{{numqj}}个全局赏商品，全局赏商品为赠送，对于单次购买单个全局赏赠送概率为{{(1/desc.number*100).toFixed(2)}}%，多次购买时赠送概率相互独立。不同的全局赏商品相对单次购买均可重复获得，全局赏在本场次售卖完后全部进行赠送。
							</view>
						</view>
					</view>
					<scroll-view class="scroll padding-xl text-left" scroll-y="true"
						style="padding:  30rpx 100rpx 100rpx;height: 70%;" v-html="explain.content">
					</scroll-view>
				</view>
			</view>
		</view>


		<view class="refresh">
			<image @click="startR" :style="{'transform': 'rotate('+360*refreshtime+'deg)','transition': 'all 1s'}"
				class="w-90 h-90" :src="Imgbase+'/'+skin+'_goodpoor_img6.png'" mode="aspectFit"></image>
		</view>

		<u-toast ref="uToast"></u-toast>


	</view>

</template>

<script>
	import md5 from '@/utils/md5.js'
	export default {
		data() {
			return {
				Imgbase: getApp().globalData.Imgbase,
				id: 0,
				desc: [],
				tab: 1,
				jilulogs: [],
				costMap: ['', '', '积分'],
				refreshtime: 0,
				openbuy: false,
				previous: 0,
				buyradio: 1,
				modalName: '',
				buymoney: 0,
				buymoneys: 0,
				buycount: 0,
				coupon: 0,
				coupon_s: 0,
				score: 0,
				score_s: 0,
				checked: true,
				scorechecked: true,
				did: 0,
				modalName2: '',
				liked: 0,
				money: 0,
				getspecial: false,
				addlength: 0,
				rewordlist: [],
				buylist: [],
				descm: [],
				timesd: 0,
				photoimg: '',
				looktitle: '',
				lookprice: 0,
				paged: 1,
				maxpaged: 0,
				explain: '',
				numa: 0,
				numqj: 0,
				explain1: '',
				hiddenlist: [],
				loadtime: false,
				poorlock: [],
				timesp: 0,
				pagesCount: 0,
				skin: 'classics'
			}
		},
		onShareAppMessage(res) {
			let _this = this;
			return {
				title: _this.desc.name,
				path: '/pagesA/goodspoor/nightdetail?id=' + _this.did,
				imageUrl: _this.desc.adimage,
			}
		},
		onLoad(e) {
			this.id = e.id
			this.did = e.id;

			let pages = getCurrentPages();
			this.pagesCount = pages.length;
		},
		onShow() {
			if (uni.getStorageSync('skin')) {
				this.skin = uni.getStorageSync('skin')
			}

			let _this = this;
			setTimeout(() => {
				_this.loadtime = false

			}, 700)

			this.poordesc()
			this.poorlist()
			this.poorLogList(1, 1)
			this.getuser()
			this.loadReword(this.id)
			this.addressList()
			this.showbuy()

			var setm = setInterval(() => {
				this.checkPoorLock()
				var pages = getCurrentPages() // 获取栈实例
				let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
				// console.log(currentRoute)
				if (currentRoute != 'pagesA/goodspoor/poordetail') {
					clearInterval(setm);
				}
			}, 1000)
		},
		methods: {
			gobape() {
				uni.switchTab({
					url: '/pages/goodspoor/backpack'
				})
			},
			async checkPoorLock() {
				let _this = this
				let item = await this.$api.post('luckorder/checkPoorLock', {
					good_poor_id: _this.did,
					token: uni.getStorageSync('token')
				})
				this.poorlock = item.data.result
				let nowtime = new Date().getTime() + ''
				let sss = (item.data.result.un_look_time * 1000 - nowtime) / 1000 + ''
				this.poorlock.un_look_time = sss.split('.')[0]
			},
			// 锁箱弹窗
			locktan() {
				uni.showToast({
					icon: 'none',
					title: '单人连续购买' + this.desc.locknum + '发且不被他人打断锁定套盒' + this.desc.locktm + '秒',
					duration: 2500
				});
			},
			showExplain(id, show) {
				let _this = this;
				uni.request({
					url: _this.$globals.apibase + '/api/Index/explain',
					data: {
						id: id
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						_this.explain = res.data.data.desc;
						_this.modalName = 'Modal'
					}
				});
			},
			showbuy() {
				let _this = this;
				uni.request({
					url: _this.$globals.apibase + '/api/Index/explain',
					data: {
						id: 19
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						_this.explain1 = res.data.data.desc.content;
					}
				});
			},
			jilupageright() {
				console.log(this.maxpaged)
				if (this.maxpaged == 0) {
					console.log(this.paged)
					this.paged++
					this.poorLogList(1, 2)
				} else {
					uni.showToast({
						icon: 'none',
						title: '已经是最后一页了',
					});
				}
			},
			jilupageleft() {
				console.log(this.paged)
				if (this.maxpaged == 1) {
					this.paged = this.paged - 2
					this.poorLogList(1, 1)
				} else {
					if (this.paged > 1) {
						this.paged--
						this.poorLogList(1, 1)
					} else {
						uni.showToast({
							icon: 'none',
							title: '已经是第一页了',
						});
					}
				}

			},
			lookhiddenmes() {
				let _this = this;
				uni.navigateTo({
					url: `/pages/goodspoor/hiddendetail?id=` + _this.did
				});
			},
			viewAdimage() {
				this.lookprice = 0
				let adimage = [];
				adimage = adimage.concat(this.desc.adimage);
				this.photoimg = adimage
				this.modalName = 'photomodel';
				this.looktitle = this.desc.name

				// uni.previewImage({
				// 	urls: adimage,
				// 	current: 0
				// });
			},
			lookImages(url, title, price) {
				console.log(price)
				this.photoimg = url
				this.looktitle = title
				if (parseFloat(price) > this.desc.cost) {
					this.lookprice = price
				} else {
					this.lookprice = this.desc.cost
				}
				this.modalName = 'photomodel';
			},
			lookboxmes() {
				let _this = this;
				uni.navigateTo({
					url: `/pages/goodspoor/boxdetail?id=` + _this.did + `&num=` + _this.desc.box_limit_num +
						`&open_custom_box=` + _this.desc.open_custom_box2 + `&open_custom_box_mes=` + _this
						.open_custom_box_mes2 + `&num2=` + _this.desc.box_limit_num2 +
						`&open_custom_box2=` + _this.desc.open_custom_box + `&open_custom_box_mes2=` + _this
						.open_custom_box_mes1
				});
			},
			lookofmes() {
				let _this = this;
				uni.navigateTo({
					url: `/pages/goodspoor/ofdetail?id=` + _this.did + `&num=` + _this.desc.box_limit_num +
						`&open_custom_box=` + _this.desc.open_custom_box2 + `&open_custom_box_mes=` + _this
						.open_custom_box_mes2 + `&num2=` + _this.desc.box_limit_num2 +
						`&open_custom_box2=` + _this.desc.open_custom_box + `&open_custom_box_mes2=` + _this
						.open_custom_box_mes1
				});
			},
			onGetPhoneNumber(e) {
				let _this = this;
				wx.login({
					success(res) {
						uni.request({
							url: _this.$globals.apibase + '/api/Minlogin/getPhoneNumber',
							data: {
								token: uni.getStorageSync('token'),
								code: res.code,
								encryptedData: e.detail.encryptedData,
								iv: e.detail.iv,
								ver: _this.$mpVer
							},
							method: 'POST',
							header: {
								'content-type': 'application/json'
							},
							success: (res) => {
								if (res.data.code == '1') {
									_this.getuser()
									uni.showToast({
										icon: 'none',
										title: '授权成功!',
										duration: 1500,
									});

									setTimeout(() => {
										_this.buybutton(_this.timesd)
									}, 1500)

								} else {
									uni.showToast({
										icon: 'none',
										title: '授权失败!',
										duration: 3000,
									});
								}
								_this.modalName = null
							}
						});
					}
				})
			},
			addressList() {
				let _this = this;
				uni.request({
					url: _this.$globals.apibase + '/api/Luckorder/addressList',
					data: {
						token: uni.getStorageSync('token'),
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.code == '401') {
							uni.setStorageSync('token', '');
							_this.$uniApi.trylogin();
						}
						if (res.data.code == '1') {
							// _this.count = res.data.data.count;
							_this.addlength = res.data.data.list.length;
						}
					}
				});
			},
			showbuy_off() {
				this.modalName2 = null
				this.poorLogList(1, 1)
			},
			loadReword(id) {
				let _this = this;
				uni.request({
					url: _this.$globals.apibase + '/api/Luckgoods/rewordlog',
					data: {
						id: id,
						// index:0,
						index: uni.getStorageSync(id + 'ren') || 0,
						hiddenindex: uni.getStorageSync(id + 'hiddenlen') || 0,
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.code == '401') {
							uni.setStorageSync('token', '');
						}
						if (res.data.code == '1') {
							// 祈愿列表 praylist
							_this.praylist = res.data.data.praylist


							var tmplog = [];
							if (uni.getStorageSync(id + 'r') != '') {
								tmplog = JSON.parse(uni.getStorageSync(id + 'r'));
							}


							for (let i = 0; i < res.data.data.loglist.length; i++) {
								tmplog = tmplog.concat(res.data.data.loglist[i])
							}


							uni.setStorageSync(id + 'r', JSON.stringify(tmplog));
							uni.setStorageSync(id + 'ren', tmplog.length);
							_this.rewordlist = tmplog.reverse()
							//_this.rewordlist = res.data.data.loglist;
							//_this.hiddenlist = res.data.data.hiddenlist;
							tmplog = [];
							if (uni.getStorageSync(id + 'hiddenl') != '') {
								tmplog = JSON.parse(uni.getStorageSync(id + 'hiddenl'));
							}
							for (let i = 0; i < res.data.data.hiddenlist.length; i++) {
								tmplog = tmplog.concat(res.data.data.hiddenlist[i])
							}
							uni.setStorageSync(id + 'hiddenl', JSON.stringify(tmplog));
							uni.setStorageSync(id + 'hiddenlen', tmplog.length);
							// let zhegnlist = tmplog.reverse()
							// console.log('3123',tmplog)
							_this.hiddenlist = tmplog.reverse()
							_this.hiddenlogscount = Math.ceil(_this.hiddenlist.length / 100);
							_this.hiddenlogs = [];
							for (let i = 0; i < _this.hiddenlogscount; i++) {
								_this.hiddenlogs[i] = [];
								for (let j = 0; j < 100; j++) {
									if (_this.hiddenlist[i * 100 + j] != null) {
										_this.hiddenlogs[i] = _this.hiddenlogs[i].concat(_this.hiddenlist[i *
											100 + j])
									}
								}
							}
							// console.log(_this.hiddenlogs[_this.hiddenlogsindex].length)
							// _this.hiddenlogs = _this.hiddenlogs.reverse()
							// _this.hiddenlogsindex = 0;
						}
						if (res.data.code == '0') {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
					}
				});
			},
			loadDesc(id) {
				let _this = this;
				_this.page = 1;
				_this.hasData = true;
				_this.loadModal = true;
				_this.loadReword(id);
				uni.request({
					url: _this.$globals.apibase + '/api/Luckgoods/poordesc',
					data: {
						token: uni.getStorageSync('token'),
						id: id,
						page: _this.page,
						index: uni.getStorageSync(id + 'len') || 0,
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.code == '401') {
							uni.setStorageSync('token', '');
							_this.login();
						}
						if (res.data.code == '1') {
							if (_this.desc != null) {
								_this.desc.info_text = [];
							}
							let numss = res.data.data.loglist
							_this.desc = res.data.data.desc;
							_this.title = _this.desc.name;
							_this.liked = res.data.data.liked;
							_this.lockstate = res.data.data.lockstate;
							_this.pray_open = res.data.data.desc.othertype;
							_this.locktime = res.data.data.locktime;
							_this.locknickname = res.data.data.locknickname;
							_this.box_limit_num = res.data.data.desc.box_limit_num;
							clearTimeout(_this.timer);
							//clearTimeout(_this.timerwechat);
							if (_this.lockstate == '1') {
								_this.showLockTime();
							}
							_this.loglist = [];
							_this.hasData = true;
							// for (let i = 0; i < res.data.data.loglist.length; i++) {
							// 	_this.loglist = _this.loglist.concat(res.data.data.loglist[i])
							// }
							if (res.data.data.loglist.length < _this.count) {
								_this.hasData = false
							}


							var tmplog = [];
							if (uni.getStorageSync(id + 'l') != '') {
								tmplog = JSON.parse(uni.getStorageSync(id + 'l'));
							}
							for (let i = 0; i < res.data.data.loglist.length; i++) {
								tmplog = tmplog.concat(res.data.data.loglist[i])
							}
							uni.setStorageSync(id + 'l', JSON.stringify(tmplog));
							uni.setStorageSync(id + 'len', tmplog.length);
							_this.loglist = tmplog.reverse()
							_this.lastlogcount = Math.ceil(_this.loglist.length / 100);
							_this.lastlogs = [];
							for (let i = 0; i < _this.lastlogcount; i++) {
								_this.lastlogs[i] = [];
								for (let j = 0; j < 100; j++) {
									if (_this.loglist[i * 100 + j] != null) {
										_this.lastlogs[i] = _this.lastlogs[i].concat(_this.loglist[i * 100 +
											j])
									}
								}
							}
							// _this.lastlogindex = 0;
						}
						if (res.data.code == '0') {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}

						setTimeout(() => {
							_this.loadModal = false;
						}, 300)
					}
				});
			},
			submitLuck() {

				let _this = this;
				_this.modalName = null;
				// if (_this.desc.othertype != '0') {
				// 	if (_this.times != 0) {
				// 		uni.showToast({
				// 			icon: 'error',
				// 			title: '该奖池为单抽奖池',
				// 			duration: 5000
				// 		});
				// 		return;
				// 	}
				// }
				if (_this.openbuy == true) {
					return;
				}
				_this.openbuy = true;
				_this.loadLuck = true;
				if (_this.desc.type == 2) {
					_this.buyradio = 0
				}
				// const date = (new Date().getTime() / 1000).toFixed(0);
				// var str = date + 'akd!k123#dfg' + _this.desc.id

				// 加密
				let str = _this.$uniApi.mdnum();
				console.log(str)
				var md5Str = md5.hex_md5(str[1])

				uni.request({
					url: _this.$globals.apibase + '/api/Luckorder/createOrder',
					data: {
						token: uni.getStorageSync('token'),
						good_poor_id: _this.desc.id,
						times: _this.times,
						ver: _this.$mpVer,
						use_coupon: _this.buyradio,
						nonce: str[2],
						sign: md5Str,
						timestamp: str[0],
						// user_score: _this.scorechecked ? 1 : 0
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						_this.loadLuck = false;
						if (res.data.code == '401') {
							uni.setStorageSync('token', '');
						}
						if (res.data.code == '1') {
							if (res.data.data.state == 1) {
								/*uni.showToast({
									icon: 'success',
									title: '抽取成功',
									duration: 5000,
								});*/
								if (_this.desc.type == 1) {
									uni.request({
										url: _this.$globals.apibase + '/api/User/doRank',
										data: {
											token: uni.getStorageSync('token'),
											price: _this.buycount * _this.desc.cost,
										},
										method: 'POST',
										header: {
											'content-type': 'application/json'
										},
										success: (res) => {},
									});
								}
								_this.getuser();
								_this.loadDesc(_this.desc.id);
								_this.modalName = null;
								_this.openbuy = false;
								_this.getspecial = res.data.data.getspecial
								//带着抽取记录去奖励界面
								_this.modalName2 = 'buyModal';
								let ssss = res.data.data.log_reword
								let dddd = res.data.data.special_rewords
								_this.buylist = JSON.parse(ssss)
								_this.buylist2 = JSON.parse(dddd)
								console.log('11111111', _this.buylist)
								console.log('11118888', _this.buylist2)
								// uni.navigateTo({
								// 	url: `/pages/goodspoor/reword?logid=` + res.data.data.logs
								// });
							} else if (res.data.data.state == 0) {
								uni.requestPayment({
									timeStamp: res.data.data.result.timeStamp,
									nonceStr: res.data.data.result.nonceStr,
									package: res.data.data.result.package,
									signType: res.data.data.result.signType,
									paySign: res.data.data.result.paySign,
									success: function(result) {
										uni.showToast({
											icon: 'success',
											title: '支付成功',
											duration: 5000,
										});
										_this.getuser();
										//_this.loadDesc(_this.desc.id);
										_this.modalName = null;
										_this.openbuy = false;
										_this.loadModal = true;
										if (_this.desc.type == 2) {
											_this.buyradio = 0
										}
										let str = _this.$uniApi.mdnum();
										var md5Str = md5.hex_md5(str[1])
										uni.request({
											url: _this.$globals.apibase +
												'/api/Luckorder/createOrder',
											data: {
												token: uni.getStorageSync('token'),
												good_poor_id: _this.desc.id,
												times: _this.times,
												ver: _this.$mpVer,
												use_coupon: _this.buyradio,
												nonce: str[2],
												sign: md5Str,
												timestamp: str[0],
												// user_score: _this.scorechecked ? 1 : 0
											},
											method: 'POST',
											header: {
												'content-type': 'application/json'
											},
											success: (res) => {
												_this.loadLuck = false;
												if (res.data.code == '401') {
													uni.setStorageSync('token', '');
												}
												if (res.data.code == '1') {
													if (res.data.data.state == 1) {
														/*uni.showToast({
															icon: 'success',
															title: '抽取成功',
															duration: 5000,
														});*/
														if (_this.desc.type == 1) {
															uni.request({
																url: _this
																	.$globals
																	.apibase +
																	'/api/User/doRank',
																data: {
																	token: uni
																		.getStorageSync(
																			'token'
																		),
																	price: _this
																		.buycount *
																		_this
																		.desc
																		.cost,
																},
																method: 'POST',
																header: {
																	'content-type': 'application/json'
																},
																success: (
																	res
																) => {},
															});
														}
														_this.getuser();
														_this.loadDesc(_this.desc.id);
														_this.modalName = null;
														_this.openbuy = false;
														_this.getspecial = res.data
															.data.getspecial
														//带着抽取记录去奖励界面
														//let ssss = res.data.data.logs
														/*_this.buylist = JSON.parse(
															ssss)*/
														_this.modalName2 = 'buyModal';
														let ssss = res.data.data
															.log_reword
														let dddd = res.data.data
															.special_rewords
														_this.buylist = JSON.parse(
															ssss)
														_this.buylist2 = JSON.parse(
															dddd)
														// console.log(res.data.data.logs)
														// uni.navigateTo({
														// 	url: `/pages/goodspoor/reword?logid=` +
														// 		res.data.data
														// 		.logs
														// });

													}
												} else {
													if (res.data.msg == '') {
														res.data.msg = '服务器繁忙,购买失败';
													}
													uni.showToast({
														icon: 'none',
														title: res.data.msg
													});
													_this.openbuy = false;
												}
											},
										});
									},
									fail: (res) => {
										_this.openbuy = false;
									},
									cancel: (res) => {
										_this.openbuy = false;
									},
								})
							} else {
								if (res.data.msg == '') {
									res.data.msg = '服务器繁忙,购买失败';
								}
								uni.showToast({
									icon: 'none',
									title: res.data.msg
								});
								_this.openbuy = false;
							}
						}
						if (res.data.code == '0') {
							if (res.data.msg == '') {
								res.data.msg = '服务器繁忙,购买失败';
							}
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
							_this.openbuy = false;
							_this.loadDesc(_this.did);
						}
					},
					fail: (res) => {
						_this.openbuy = false;
					},
					cancel: (res) => {
						_this.openbuy = false;
					},
				});
			},
			isSave() {
				let _this = this;
				uni.request({
					url: _this.$globals.apibase + '/api/Luckorder/isSave',
					data: {
						token: uni.getStorageSync('token'),
						id: this.id
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.data.count == 0) {
							_this.liked = 0;
						} else {
							_this.liked = 1;
						}
					}
				});
			},
			// 获取个人信息
			getuser() {
				let _this = this;
				uni.request({
					url: _this.$globals.apibase + '/api/Userways/userFront',
					data: {
						token: uni.getStorageSync('token'),
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.code == '1') {
							_this.descm = res.data.data.user_desc
							_this.id = res.data.data.user_desc.id;
							_this.money = res.data.data.user_desc.money;
							_this.score = Number(res.data.data.user_desc.score)
							_this.score = 0
							_this.pray_number = res.data.data.user_desc.pray_number;
							_this.coupon = res.data.data.user_desc.coupon / 10;

						}
					}
				});
			},
			hideModal(e) {
				this.modalName = null
				this.buyradio = 1
				this.checked = true
				this.scorechecked = true
				this.poorLogList(1, 1)
			},
			hideModal2(e) {
				this.modalNamebuy = null
				this.modalName2 = false
				this.poorLogList(1, 1)
			},
			// 积分可抵值按钮
			scoreChange() {
				let _this = this,
					scorenum = Number(_this.score / 10 > _this.buymoney / 2 ? _this.buymoney / 2 : _this.score / 10)
				this.scorechecked = !this.scorechecked
				if (this.scorechecked) {
					_this.buymoneys = Number(_this.buymoneys - scorenum > 0 ? _this.buymoneys - scorenum : 0).toFixed(2)
					// console.log(_this.buymoneys)
				} else {
					console.log(_this.buymoney)
					_this.buymoneys = (Number(_this.buymoneys) + scorenum).toFixed(2) > _this.buymoney ? _this.buymoneys :
						(Number(_this.buymoneys) + scorenum).toFixed(2)
				}
			},
			radioChange(e) {
				let _this = this,
					scorenum = Number(_this.score / 10 > _this.buymoney / 2 ? _this.buymoney / 2 : _this.score / 10)

				this.checked = !this.checked
				console.log(this.checked)
				console.log(this.buyradio)
				let sss = this.buymoney.split('欧')[0];
				this.buymoneys = sss - this.coupon
				if (this.buyradio == 1) {
					this.buyradio = 0
					this.buymoneys = this.buymoney
				} else {
					console.log(123123)
					let sss = this.buymoney.split('欧')[0];
					let a = sss - this.coupon
					if (a > 0) {
						this.buymoneys = a
					} else {
						this.buymoneys = 0
					}
					this.buyradio = 1
				}


				if (_this.scorechecked) {
					_this.buymoneys = Number(_this.buymoneys - scorenum > 0 ? _this.buymoneys - scorenum : 0).toFixed(2)
				} else {
					_this.buymoneys = (Number(_this.buymoneys) + scorenum).toFixed(2) > Number(_this.buymoney) ? _this
						.buymoneys :
						(Number(_this.buymoneys) + scorenum).toFixed(2)
				}
				console.log(_this.buymoneys)


			},
			buybutton(times) {
				let _this = this;

				// 判断有无绑定手机号
				if (this.descm.mobile == '') {
					this.$refs.uToast.show({
						message: "请先绑定手机号",
						duration: 1500,
					})
					setTimeout(() => {
						_this.modalName = 'getPhoneNumber';
					}, 1500)

					this.timesd = times
					return
				}

				// 判断有无收货地址
				if (this.addlength == 0) {
					this.$refs.uToast.show({
						message: "请添加收货地址",
						duration: 1500,
					})
					setTimeout(() => {
						uni.navigateTo({
							url: '/pages/index/address'
						})
					}, 1500)
					return
				}


				let now = parseInt(new Date().getTime()) + '';
				let wait = 1000;
				if (now - this.previous > wait) {
					this.previous = now;
					this.doLuck(times)
				} else {
					// uni.showToast({
					// 	icon: 'none',
					// 	title: '请勿频繁操作',
					// });
				}
			},
			doLuck(times) {
				this.checked = true
				this.scorechecked = true
				this.buyradio = 1
				let _this = this;
				if (_this.loadLuck == true || _this.openbuy == true) {
					return;
				}
				_this.times = times;
				if (_this.times == 0) {
					_this.buycount = 1;
				}
				if (_this.times == 1) {
					_this.buycount = 3;
				}
				if (_this.times == 2) {
					_this.buycount = 10;
				}
				if (_this.desc.count < _this.buycount) {
					uni.showToast({
						icon: 'none',
						title: '奖池剩余抽数不足' + _this.buycount + '发',
						duration: 5000
					});
					return;
				}
				_this.buymoney = parseFloat(_this.buycount * _this.desc.cost).toFixed(2);
				let coupon = parseFloat(_this.coupon)
				if (coupon < _this.buymoney) {
					_this.coupon_s = _this.coupon
				} else {
					_this.coupon_s = _this.buymoney
				}
				let numss = parseFloat(_this.buycount * _this.desc.cost).toFixed(2) - _this.coupon
				if (numss > 0) {
					_this.buymoneys = numss;
				} else {
					_this.buymoneys = 0;
				}

				if (_this.scorechecked) {
					let scorenum = Number(_this.score / 10 > _this.buymoney / 2 ? _this.buymoney / 2 : _this.score / 10)
					_this.buymoneys = Number(_this.buymoneys - scorenum > 0 ? _this.buymoneys - scorenum : 0).toFixed(2)
				}


				// _this.buymoneys = parseFloat(_this.buycount * _this.desc.cost).toFixed(2);
				if (_this.desc.type == 2) {
					let mes = '';
					if (_this.score >= _this.buymoney) {} else {
						mes += '积分不足，无法购买';
					}
					_this.buymes = mes;
					_this.buymoney += '积分';
				} else {
					let mes = '';
					if (parseFloat(_this.money) >= parseFloat(_this.buymoney)) {} else {
						mes += '不足，';
						let needpay = parseFloat(_this.buymoney - _this.money).toFixed(2);
						mes += '需支付' + needpay + '';
					}
					_this.buymes = mes;
				}
				//_this.modalName = 'paymodel';
				_this.modalName = 'bottomModal';
			},
			// 刷新
			startR() {
				if (getApp().globalData.couldFresh == true) {
					getApp().globalData.couldFresh = false;
					setTimeout(() => {
						getApp().globalData.couldFresh = true;
					}, 1000)
				} else {
					/*uni.showToast({
						icon: 'none',
						title: '刷新频率点击太快啦'
					});*/
					return;
				}
				this.refreshtime += 1;
				this.openbuy = false;
				//this.getuser();
				this.loadDesc(this.did);
				this.poorLogList(1, 1)
			},
			// 有底池 -- 记录
			poorLogList(page, one) {
				let _this = this
				_this.loadModal = true;
				uni.request({
					url: _this.$globals.apibase + '/api/Luckgoods/poorLogList',
					data: {
						token: uni.getStorageSync('token'),
						poor_id: _this.did,
						index: _this.paged,
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.code == '401') {
							uni.setStorageSync('token', '');
						}
						if (res.data.code == '1') {
							if (res.data.data.list == '' && one == 2) {
								_this.maxpaged = 1
							} else {
								_this.maxpaged = 0
								_this.jilulogs = res.data.data.list
							}

						}
						if (res.data.code == '0') {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
						setTimeout(() => {
							_this.loadModal = false;
						}, 300)
					}
				});
			},
			savePoor(id) {
				let _this = this;
				uni.request({
					url: _this.$globals.apibase + '/api/Luckorder/savePoor',
					data: {
						token: uni.getStorageSync('token'),
						goods_poor_id: id,
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.code == '401') {
							uni.setStorageSync('token', '');
						}
						if (res.data.code == '1') {
							uni.showToast({
								icon: 'success',
								title: '添加收藏成功'
							});
							_this.liked = 1;
						}
						if (res.data.code == '0') {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
					}
				});
			},
			unsavePoor(id) {
				let _this = this;
				uni.request({
					data: {
						token: uni.getStorageSync('token'),
						goods_poor_id: id,
					},
					method: 'POST',
					header: {
						'content-type': 'application/json'
					},
					success: (res) => {
						if (res.data.code == '401') {
							uni.setStorageSync('token', '');
						}
						if (res.data.code == '1') {
							uni.showToast({
								icon: 'success',
								title: '取消收藏成功'
							});
							_this.liked = 0;
						}
						if (res.data.code == '0') {
							uni.showToast({
								icon: 'none',
								title: res.data.msg
							});
						}
					}
				});
			},
			gotop() {
				uni.navigateTo({
					url: '/pages/goodspoor/index'
				})
			},
			back() {
				if (this.pagesCount == 1) {
					uni.switchTab({
						url: '/pages/goodspoor/index'
					})
				} else {
					uni.navigateBack()
				}
			},
			// tab切换
			tab_btn(e) {
				this.tab = e
			},
			// 获取奖池
			async poordesc() {
				let _this = this
				let item = await this.$api.post('Luckgoods/poordesc', {
					token: uni.getStorageSync('token'),
					id: _this.did,
					orderid: 1,
					keyword: '',
					page: 1
				})
				this.desc = item.data.desc
				let Anum = 0,
					QJnum = 0
				item.data.desc.info_text.forEach(function(it) {
					if (it.reword_type_id == 3) {
						QJnum += it.allnumber
					}
					if (it.reword_type_id == 4) {
						Anum += it.allnumber
					}
				})
				this.numqj = QJnum
				this.numa = Anum
			},
			// 抽奖
			async createOrde(e) {
				let _this = this
				let item = await this.$api.post('infinite/createOrder', {
					token: uni.getStorageSync('token'),
					good_poor_id: _this.id,
					ver: _this.$mpVer,
					times: e
				})
				this.desc = item.data.desc
			},
			async poorlist() {
				let _this = this
				let item = await this.$api.post('Luckgoods/poorlist', {
					token: uni.getStorageSync('token'),
					id: 0,
					orderid: 1,
					keyword: '',
					page: 1
				})
			},
		},
	}
</script>

<style lang="less" scoped>
	.qingcolor {
		color: #fff;
	}

	.orcolor {
		color: #59100B;
	}

	.nightitem {
		background-color: #fafafa;
	}

	.text-ff {
		position: absolute;
		bottom: 40rpx;
		background-color: rgba(255, 255, 255, .5);
		width: 55%;
		text-align: center;
		border-radius: 25rpx;
		left: 22.5%;
		color: #000;
		padding-bottom: 5rpx;
	}

	.pos_bgc2 {
		position: absolute;
		top: 10%;
		left: 0;
		// z-index: 18;
	}

	.pos_bgc {
		position: absolute;
		top: 10%;
		left: 0;
		-webkit-transform: rotate(360deg);
		animation: rotation 60s linear infinite;
		-moz-animation: rotation 12s linear infinite;
		-webkit-animation: rotation 12s linear infinite;
		-o-animation: rotation 12s linear infinite;
		// z-index: 15;
	}

	@-webkit-keyframes rotation {
		from {
			-webkit-transform: rotate(0deg);
		}

		to {
			-webkit-transform: rotate(360deg);
		}
	}

	.bottom_item {
		width: 98%;
		padding-left: 2%;
		margin-top: 35rpx;
		position: relative;

		.bgcimg {
			width: 99%;
			position: absolute;
			top: -30rpx;
			left: 1%;
			z-index: 20;
		}

		.bgcimgwinter {
			width: 60%;
			position: absolute;
			top: 15rpx;
			right: -1%;
			z-index: 20;
		}

		.bgcimg1 {
			width: 98%;
			position: absolute;
			top: -50rpx;
			right: -1%;
			z-index: 20;
		}

		.bgc_bot {
			width: 98%;
			padding-left: 2%;
		}

		.skinbgc {
			background-color: #F0E3CE;
			box-shadow: 0rpx 0rpx 15rpx 0rpx #4e4e4e;
			border-radius: 20rpx;
		}
	}

	.skinco {
		background-color: #f0e3ce;
		box-shadow: 0rpx 0rpx 15rpx 0rpx #4e4e4e;
	}

	.top_item {
		margin: 60rpx auto 0;

		.imgto {
			margin-top: -20rpx;
		}

		.heng {
			background-color: #F5F5F5;
			width: 565rpx;
			height: 32rpx;
			border-radius: 10rpx;
			overflow: hidden;
			border: 4rpx solid #fff;
			position: relative;

			.numd {
				position: absolute;
				right: 15rpx;
				top: 0rpx;
				z-index: 99;
				color: #000;
				font-weight: bold;
				font-size: 19rpx;
				width: 100%;
				text-align: center;
				line-height: 24rpx;
			}

			.its {
				background-color: #ECBD37;
				border-radius: 10rpx;
			}

		}
	}

	.loadshow {
		transition: .3s;
		opacity: 1;
	}

	.loadnoshow {
		transition: .3s;
		opacity: 0;
	}

	page {
		background-color: #B7E0DA;
	}

	.left_scr {
		background-color: rgba(0, 0, 0, .3);
	}

	.text_color1 {
		color: #922D2D;
	}

	.text_color2 {
		color: #E60000;
	}

	.text_color1winter {
		color: #fff;
	}

	.text_color2winter {
		color: #5C5C92;
	}

	.text_color3 {
		color: #8A5E51;
	}

	.cu-dialog {
		// background-image: linear-gradient(#8acee7, #ADE3E4);
	}

	.text_item {
		// height: 30rpx;
		// line-height: 30rpx;
		// color: #fff;
	}


	.record {
		min-height: 100rpx;
		width: 95%;
		margin: 0 auto;
		border-radius: 20rpx;
		overflow: hidden;
	}

	.skinca {
		background-color: rgba(236, 199, 160, .8);
	}

	.skinwin {
		background-color: rgba(92, 92, 146, .4);
	}

	.list_item {
		float: left;
		margin-bottom: 20rpx;
		margin-right: 25rpx;
	}

	.list_item:nth-child(3n) {
		margin-right: 0;
	}

	.refresh {
		position: fixed;
		right: 40rpx;
		bottom: 350rpx;
		z-index: 99;
	}

	.btns {
		position: fixed;
		bottom: 10rpx;
		z-index: 99;
	}

	.jitem {
		display: inline-block;
		margin-right: 60rpx;
	}


	.zinde {
		position: relative;
		z-index: 10;
	}

	.card_bgc {
		position: absolute;
		top: 0;
		left: 0;
		z-index: 0;
	}

	.auto {
		margin: 0 auto;
	}

	button:after {
		border: none;
	}

	.score {
		position: absolute;
		top: 0;
		right: 0;
		background-color: #057DD6;
		color: #fff;
		padding: 5rpx 10rpx;
	}

	.buylock {
		position: absolute;
		top: 0;
		left: 0;
		background-color: red;
		color: #fff;
		padding: 5rpx 10rpx;
	}

	.userlock {
		position: absolute;
		bottom: 0;
		width: 100%;
		background-color: red;
		color: #fff;
		padding: 5rpx 10rpx;
	}
</style>